alter table jms_dm.dm_sqs_project_customer_waybill_detail_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_sqs_project_customer_waybill_detail_dt;
CREATE EXTERNAL TABLE jms_dm.dm_sqs_project_customer_waybill_detail_dt
(
    waybill_id               string comment '运单号',
    project_first_type_code  string comment '项目一级',
    project_first_type_name  string comment '项目一级',
    project_second_type_name string comment '项目二级',
    customer_code            string comment '客户编码',
    customer_name            string comment '客户名称',
    date_time                string comment '日期',
    complaint_flag           int comment '1代表客诉标识',
    sham_flag                int comment '1代表虚假标识',
    delay_flag               int comment '1代表延误标识',
    worn_flag                int comment '1代表破损标识'
) COMMENT '平台项目指标达成报表'
    PARTITIONED BY (
        dt string COMMENT '订单录入日期')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_sqs_project_customer_waybill_detail_dt'
;